package Com.amit.IO;

import java.io.CharArrayWriter;
import java.io.FileWriter;

public class Lab12 {

	
	public static void main(String[] args) throws Exception {
		
		CharArrayWriter out=new CharArrayWriter();
		out.write("i am amit");
		
		FileWriter f1=new FileWriter("C:\\Users\\NETA JEE\\Desktop\\Amit.txt");
		FileWriter f2=new FileWriter("C:\\Users\\NETA JEE\\Desktop\\Anil.txt");
		FileWriter f3=new FileWriter("C:\\Users\\NETA JEE\\Desktop\\raj.txt");
		FileWriter f4=new FileWriter("C:\\Users\\NETA JEE\\Desktop\\k.txt");
		
		out.writeTo(f1);
		out.writeTo(f2);
		out.writeTo(f3);
		out.writeTo(f4);
		
		
		f1.close();
		f2.close();
		f3.close();
		f4.close();
		
		System.out.println("Success");
		
		
	}

}
